<template>
<div class="layui-container fly-marginTop fly-user-main">
  <UserNav :current=4></UserNav>
  <div class="fly-panel fly-panel-user" pad20>
    <div class="layui-tab layui-tab-brief" lay-filter="user" id="LAY_msg" style="margin-top: 15px;">
      <button class="layui-btn layui-btn-danger" id="LAY_delallmsg">清空全部消息</button>
      <div  id="LAY_minemsg" style="margin-top: 10px;">
        <!--<div class="fly-none">您暂时没有最新消息</div>-->
        <ul class="mine-msg">
          <li data-id="123">
            <blockquote class="layui-elem-quote">
              <a href="/jump?username=Absolutely" target="_blank"><cite>Absolutely</cite></a>回答了您的求解<a target="_blank" href="/jie/8153.html/page/0/#item-1489505778669"><cite>layui后台框架</cite></a>
            </blockquote>
            <p><span>1小时前</span><a href="javascript:;" class="layui-btn layui-btn-small layui-btn-danger fly-delete">删除</a></p>
          </li>
          <li data-id="123">
            <blockquote class="layui-elem-quote">
              系统消息：欢迎使用 layui
            </blockquote>
            <p><span>1小时前</span><a href="javascript:;" class="layui-btn layui-btn-small layui-btn-danger fly-delete">删除</a></p>
          </li>
        </ul>
      </div>
    </div>
	</div>
</div>
</template>

<script>
import UserNav from './UserNav.vue'
import request from '@/utils/request'
export default {
  components: {
     UserNav,
  },
  data() {
    return {
      id: 0, //ID
      title: "", //标题
      address: "bbs.100txy.com", //地址
      data: {
        user_info: {}
      }, //帖子详情
      comment: [], // 帖子评论列表
    };
  },
  mounted(){
    console.log(this.$route)
    console.log("id:",this.$route.params.id)
    // this.getDetail(this.$route.params.id) //获取帖子详情
  },
  setup(){
    console.log("setup start")
    myFn()
    function myFn(){
      console.log("aaa");
    }
    return {
      myFn
    }
  },
  methods: {
    //获取帖子详情
    getDetail(id) {
      const params = {
        params: {
        }
      }
      request.get('/micro-bbs/v1/post/'+id, params).then((res) => {
        const { code, data } = res
        // this.notifySucceed(message);
        if (code === 200) {
          this.title = data.title
          this.data = data.data
          this.comment = data.comment
        }
      })
    },

  }
}
</script>